package edu.bit.water.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

public class WarningRule {

    //规则ID
    private int id;
    //规则名称
    private String name;


    //规则创建时间
    private String createDate;
    //定义
    private String defination;
    //监控设备（对应设备表的name，水表的sensor_raw_id）
    private String sensorRowId;
    //监控三级预警最低限值
    private float ruleValue3L;
    //监控二级预警最低限值
    private float ruleValue2L;
    //监控一级预警最低限值
    private float ruleValue1L;
    //监控正常运行最低限值
    private float ruleValue0L;
    //监控正常运行最高限值
    private float ruleValue0H;
    //监控一级预警最高限值
    private float ruleValue1H;
    //监控二级预警最高限值
    private float ruleValue2H;
    //监控三级预警最高限值
    private float ruleValue3H;
    //监控设备类型
    private  String sensorSort;
    //监控设备所在车间
    private  String workshop;

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    private int companyId;


    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getSensorSort() {
        return sensorSort;
    }

    public void setSensorSort(String sensorSort) {
        this.sensorSort = sensorSort;
    }

    public String getWorkshop() {
        return workshop;
    }

    public void setWorkshop(String workshop) {
        this.workshop = workshop;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    /*public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }
    */

    public void setName(String name) {
        this.name = name;
    }

    public String getDefination() {
        return defination;
    }

    public void setDefination(String defination) {
        this.defination = defination;
    }

    public String getSensorRowId() {
        return sensorRowId;
    }

    public void setSensorRowId(String sensorRowId) {
        this.sensorRowId = sensorRowId;
    }

    public float getRuleValue3L() {
        return ruleValue3L;
    }

    public void setRuleValue3L(float ruleValue3L) {
        this.ruleValue3L = ruleValue3L;
    }

    public float getRuleValue2L() {
        return ruleValue2L;
    }

    public void setRuleValue2L(float ruleValue2L) {
        this.ruleValue2L = ruleValue2L;
    }

    public float getRuleValue1L() {
        return ruleValue1L;
    }

    public void setRuleValue1L(float ruleValue1L) {
        this.ruleValue1L = ruleValue1L;
    }

    public float getRuleValue0L() {
        return ruleValue0L;
    }

    public void setRuleValue0L(float ruleValue0L) {
        this.ruleValue0L = ruleValue0L;
    }

    public float getRuleValue0H() {
        return ruleValue0H;
    }

    public void setRuleValue0H(float ruleValue0H) {
        this.ruleValue0H = ruleValue0H;
    }

    public float getRuleValue1H() {
        return ruleValue1H;
    }

    public void setRuleValue1H(float ruleValue1H) {
        this.ruleValue1H = ruleValue1H;
    }

    public float getRuleValue2H() {
        return ruleValue2H;
    }

    public void setRuleValue2H(float ruleValue2H) {
        this.ruleValue2H = ruleValue2H;
    }

    public float getRuleValue3H() {
        return ruleValue3H;
    }

    public void setRuleValue3H(float ruleValue3H) {
        this.ruleValue3H = ruleValue3H;
    }

    public void showContent() {
//        System.out.println("name:" + name);
//        System.out.println("sensorRowId:" + sensorRowId);
//        System.out.println("created_at: " + this.createDate);
    }
    /*
    新建一条规则时获取当前日期字符串;
     */
    public void setCreated_At() {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HH:mm");
        //System.out.println(formatter.format(date));
        this.createDate = formatter.format(date);
    }

    public static void main(String[]args) {
        new WarningRule().setCreated_At();
    }

//    public int getRuleType() {
//        return ruleType;
//    }
//
//    public void setRuleType(int ruleType) {
//        this.ruleType = ruleType;
//    }
//
//    public float getRuleValue() {
//        return ruleValue;
//    }
//
//    public void setRuleValue(float ruleValue) {
//        this.ruleValue = ruleValue;
//    }
}
